<?php
require_once 'jq-config.php';
// include the jqGrid Class
require_once ABSPATH."php/jqGrid.php";
// include the driver class
require_once ABSPATH."php/jqGridPdo.php";
// Connection to the server
$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);
// Tell the db that we use utf-8
jqGridDB::query($conn,"SET NAMES utf8");
$rowid = jqGridUtils::Strip($_REQUEST["rowid"]);
if(!$rowid) die("Missed parameters");
// Get details
$SQL = "SELECT * FROM twitts WHERE id=".$rowid;
//echo $SQL."<br>";
$qres = jqGridDB::query($conn, $SQL);
$result = jqGridDB::fetch_assoc($qres,$conn);
//var_dump($result);
$s = "<table><tbody>";
$s .= "<tr><td><b>User Name</b></td><td>".$result["UserName"]."</td>";
$s .= "<td rowspan='3' valign='top'><img src='".trim($result["imageURL"])."'/></td></tr>";
$s .= "<tr><td><b>Text</b></td><td>".$result["text"]."</td></tr>";
$s .= "<tr><td><b>Polarity</b></td><td>".$result["polarity"]."</td></tr>";
$s .= "</tbody></table>";
echo $s;
jqGridDB::closeCursor($qres);
?>
